package service;

import java.io.IOException;
import java.util.Scanner;

import ui.OrderUI;
import ui.WelcomeUi;

public class CashierRegist {
	//显示基础界面
	private Scanner sc = new Scanner(System.in);
		public void showCashierBasicUi(String s) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IOException{
			System.out.println("请选择功能：1 点餐	2 抽奖	3 返回上一级菜单");
			int x = sc.nextInt();
			switch (x) {
			case 1:
				@SuppressWarnings("rawtypes")
				Class c1 = Class.forName("ui.OrderUI");
				OrderUI ou = (OrderUI) c1.newInstance();
				ou.dc(s);
				break;
			case 2:
				@SuppressWarnings("rawtypes")
				Class c = Class.forName("service.Prize");
				Prize p =(Prize) c.newInstance();
				p.cj();
				break;
			case 3:
				@SuppressWarnings("rawtypes")
				Class c2 = Class.forName("ui.WelcomeUi");
				WelcomeUi wu = (WelcomeUi) c2.newInstance();
				wu.welcome();
				break;
			default:
				System.out.println("输入有误！");
				break;
			}
		}

}
